import { BehaviorSubject } from '@ds/ds-micro/dist';

let singleStore = {
    systemData:  new BehaviorSubject({}),
    data: new BehaviorSubject({}) 
};


export function setSingleStore(store: BehaviorSubject<{}>, key?: 'systemData'| 'data') {
    singleStore[key ?? 'data'] = store;
}


export function getSingleStore(key?: 'systemData'| 'data') {
    const k  = key ?? 'data';
    return singleStore[k];
}


